package lapsnake.model.stmt;

import lapsnake.model.*;
import lapsnake.model.data.*;
import lapsnake.model.data.OptionalChild;
import lapsnake.model.data.SingleChild;
import lapsnake.py.ast.ASTHelperFactory; import java.beans.PropertyVetoException;

import org.python.antlr.ast.*;

/**Wrapper class with helper functions for Assert nodes*/
public class LapAssert extends LapStatement {
	public final SingleChild<LapExpression> test = new SingleChild<>(this, LapExpression.class);
	public final OptionalChild<LapExpression> message = new OptionalChild<>(this, LapExpression.class);

	public LapAssert(PyAST pyAST, ChildField<? super LapAssert> parent, Assert node) throws PropertyVetoException {
		super(pyAST, parent, node);
		
		ASTHelperFactory.makeHelper(pyAST, test, node.getInternalTest());
		ASTHelperFactory.makeHelper(pyAST, message, node.getInternalMsg());
		
		buildTextNodes(node);
	}
}
